<?php

namespace App\Http\Requests\Admin\Login;

use Illuminate\Foundation\Http\FormRequest;

class AuthenticationCreate extends FormRequest
{
    /**
     * Determine if the user is authorized to make this request.
     *
     * @return bool
     */
    public function authorize()
    {
        return true;
    }

    /**
     * 定义表单规则
     *
     * Date: 2018/05/24
     * @author Tenny
     * @return array
     */
    public function rules()
    {
        return [
            'heads_path'=>'required',
            'tails_path' => 'required',
        ];
    }

    /**
     * 定义错误响应消息
     *
     * Date: 2018/05/24
     * @author Tenny
     * @return array
     */
    public function messages()
    {
        return [
            'heads_path.required' => '请上传正面证件照',
            'tails_path.required' => '请上传反面证件照',
        ];
    }
}
